<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8" buffer="64kb"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>密码修改</title>
        <script language="JavaScript" src="${ctx}/js/jquery.js"></script>
		<script language="JavaScript" src="${ctx}/js/filter.js"></script>
		<script language="JavaScript" src="${ctx}/js/json2.js"></script>
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css" />

</head>
<body>

<div class="bg">
		  <div class="bg_inside">
		<div class="head">
			<c:import url="/pages/safeai/jsp/shop/header.jsp"></c:import>
		</div>
<c:import url="/front/userinfo.do?method=myRayi"></c:import>
 
<div class="user_order_content">
<div  class="user_order_content_top"><img src="../images/user_order_content_top.jpg" /></div>
<div class="user_order_content_center">
<ul >
<li style=" background-image:url(../images/title_letter_icon.jpg); background-position:left center; background-repeat:no-repeat;padding:5px 0px 0px 15px;margin-bottom:5px;line-height:15px;color:#5a3e2e">密码修改</li>

<li style="text-align:center">旧 密 码 <label>  <input type="password" id="p1" />  </label></li>
<li style="text-align:center">新 密 码 <label>  <input type="password" id="p2" />  </label></li>
<li style="text-align:center">确认密码 <label>  <input type="password" id="p3" />  </label></li>
<li style="text-align:center;margin-top:20px;"><a href="${ctx}/front/userinfo.do?method=updateMemberPassword" id="hr" onclick="return sub();" class="reg_button ">保存修改</a></li>
<li><span style="font-family:'宋体'; font-size:12px; color:#FF0000;width:300px;border:0;text-align:left;">${MSG}</span></li>
 </ul>
 </div>
<div class="user_order_content_bottom"><img src="../images/user_order_content_bottom.jpg" /></div>
</div>
</div> 

<div style="margin-top:10px;*+margin-top:20px"><%@ include file="/user/commonProblem.jsp"%></div>
<div class="bottom">
	<%@ include file="/pages/safeai/jsp/shop/bottom.jsp"%>	
	<div class="clearAll"></div>
</div>

</body>
</html>
<script language="javascript"> 
	function sub(){
		var p1 = document.getElementById("p1").value;
		var p2 = document.getElementById("p2").value;
		var p3 = document.getElementById("p3").value;
		var hr = document.getElementById("hr");
		
		if(p1 == null || p1 == ""){
			document.getElementById("p1").focus();
			alert("请输入您的旧密码!");
			return false;
		}else{
			if(p1.length>40){
				alert("密码的长度不能超过40个字符!");
				return false;
			}
		}
		if(p2 == null || p2 == ""){
			document.getElementById("p2").focus();
			alert("请输入您的新密码!");
			return false;
		}else{
			if(p2.length>40){
				alert("新密码的长度不能超过40个字符!");
				return false;
			}
		}
		if(p3 == null || p3 == ""){
			document.getElementById("p3").focus();
			alert("请输入您的确认密码!");
			return false;
		}else{
			if(p3.length>40){
				alert("确认密码的长度不能超过40个字符!");
				return false;
			}
		}
		if(p2 != p3){
			document.getElementById("p3").focus();
			alert("新密码输入不一致,请确认您的新密码!");
			return false;
		}
		
		
		hr.href = hr.href + "&p1=" + p1 + "&p2=" + p2 + "&p3=" + p3;
		return true;
	}
</script>
  